import 'package:enterprise_v6_app/app/core/core.dart';
import 'package:enterprise_v6_app/app/core/ext/ext.dart';
import 'package:enterprise_v6_app/app/modules/task/task_all/risk_control/risk_control_controller.dart';

///我的任务-风险管控
class RiskControlPage extends StatelessWidget {
  RiskControlPage({super.key});

  final controller = Get.put(RiskControlMeController());

  @override
  Widget build(BuildContext context) {
    return ListView(
      children: controller.productiveList
          .map((e) => Container(
        margin: EdgeInsets.only(left: 14.w, right: 14.w, top: 12.w),
        decoration: const BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.all(
              Radius.circular(8),
            )),
        child: Row(
          children: [
            AppGaps.hGap20,
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  AppGaps.vGap16,
                  Text(
                    e.title,
                    style: TextStyle(
                      fontSize: 16.sp,
                      color: AppColors.font_color_black,
                      fontWeight: FontWeight.w500,
                    ),
                  ),
                  AppGaps.vGap16,
                  SvgPicture.asset(e.icon),
                  AppGaps.vGap16,
                ],
              ),
            ),
            SvgPicture.asset(e.image),
            AppGaps.hGap16,
          ],
        ),
      ).click(() {
        controller.onClickItem(e);
      }))
          .toList(),
    );
  }
}
